<script setup>
import {ref,onMounted} from "vue"
import axios from "axios"
import { useRoute } from "vue-router"
import animeModel1 from "../../components/animeModel1.vue"
import animeModel2 from "../../components/animeModel2.vue"

const local = "localhost"
const port = 8088

//值传递
const route = useRoute()

const ywsndnnVideoUrl = ref("")
const fan_name = ref("")
const fan_fm = ref("")

const fan1Url = ref("")
const fan2Url = ref("")
const fan3Url = ref("")
const fan4Url = ref("")
const fan5Url = ref("")
const fan6Url = ref("")
const fan7Url = ref("")
const fan8Url = ref("")
const fan9Url = ref("")
const fan10Url = ref("")
const fan11Url = ref("")
const fan12Url = ref("")

axios.get(`http://${local}:${port}/anime/ywsndnn`).then(async res=>{
    ywsndnnVideoUrl.value = await res.data[0].anime_msg[route.params.fan - 1].fan_player
    fan1Url.value = await res.data[0].anime_msg[0].fan_player
    fan2Url.value = await res.data[0].anime_msg[1].fan_player
    // fan3Url.value = await res.data[0].anime_msg[2].fan_player
    // fan4Url.value = await res.data[0].anime_msg[3].fan_player
    // fan5Url.value = await res.data[0].anime_msg[4].fan_player
    // fan6Url.value = await res.data[0].anime_msg[5].fan_player
    // fan7Url.value = await res.data[0].anime_msg[6].fan_player
    // fan8Url.value = await res.data[0].anime_msg[7].fan_player
    // fan9Url.value = await res.data[0].anime_msg[8].fan_player
    // fan10Url.value = await res.data[0].anime_msg[9].fan_player
    // fan11Url.value = await res.data[0].anime_msg[10].fan_player
    // fan12Url.value = await res.data[0].anime_msg[11].fan_player
    
    fan_name.value = await res.data[0].name
    fan_fm.value = await res.data[0]. anime_image
}).catch(err=>console.log(err))

onMounted(()=>{

})

</script>

<template>
    <div class="ywsndnnVideoAll">
        <div class="dialogBoxColor"></div>
        <div class="ywsndnnVideoMasterBox">
            <animeModel1 
            :videoUrl="ywsndnnVideoUrl"

            :fan1Url="fan1Url"
            :fan2Url="fan2Url"
            
            />
        </div>
    </div>
</template>

<style scoped>
.ywsndnnVideoAll{
    position: absolute;
    left: 0;
    top: 0;
    width: 1855px;
    height: 100%;
}
.dialogBoxColor{
    width: 100%;
    height: 6%;
    background: linear-gradient(to bottom,rgb(41,69,84),rgb(171,103,108));
}
.ywsndnnVideoMasterBox{
    width: 100%;
    height: 94%;
}
</style>